<?php

namespace App\Miya\Models;

use Illuminate\Database\Eloquent\Model;

class DerivativeKeyword extends Model
{
    protected $guarded = [];
    static public $types = [
        0 => '主关键词',
        1 => '地区词',
        2 => '词头衍生词',
        3 => '词尾衍生词',
        4 => '长尾词',
        5 => '地区词头衍生词',
        6 => '地区词尾衍生词',
        7 => '地区长尾词',
    ];

    public function area()
    {
        return $this->belongsTo(Area::class);
    }

    public function main_keyword()
    {
        return $this->belongsTo(Keyword::class, 'keyword_id');
    }
}
